﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.Paint.Mesh.CUiMeshCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System.Windows;
using System.Windows.Forms.Integration;
using Tecnomatix.Engineering;
using Tecnomatix.Engineering.Ui;


namespace DnProcessSimulateCommands.Paint.Mesh;

public class CUiMeshCmd : TxButtonCommand
{
  private CUiMeshEnabler m_MeshEnabler;

  public CUiMeshCmd() => this.m_MeshEnabler = new CUiMeshEnabler();

  public virtual string Category => MeshResource.MESH_CATEGORY;

  public virtual string Name => MeshResource.MESH_NAME;

  public virtual string Tooltip => MeshResource.MESH_TOOLTIP;

  public virtual string Description => MeshResource.MESH_DESCRIPTION;

  public virtual ITxCommandEnabler CommandEnabler => (ITxCommandEnabler) this.m_MeshEnabler;

  public virtual string Bitmap => "Paint.Mesh.Resources.mesh.bmp";

  public virtual string LargeBitmap => "Paint.Mesh.Resources.create_mesh_BIG.png";

  public virtual bool Licensed => TxCommandLicenser.PaintCreateMeshesLicense;

  public virtual ITxImage Image => (ITxImage) TxImageManager.GetImageByKey("CreateMesh");

  public virtual void Execute(object cmdParams)
  {
    CUiMeshWindow cuiMeshWindow = new CUiMeshWindow(CUiMeshUtil.FilterSelection());
    ElementHost.EnableModelessKeyboardInterop((Window) cuiMeshWindow);
    ((Window) cuiMeshWindow).Show();
  }
}
